package com.ghck.server.service;
import java.util.List;

import com.ghck.server.model.Disease;
import com.ghck.server.model.DiseaseCategoryDict;
import com.ghck.server.model.DiseaseReq;
import com.ghck.server.model.Symptom;
import com.ghck.server.model.query.DiseaseQuery;
import com.ghck.server.model.response.DiseaseRes;
import com.ghck.server.model.response.IdNameRes;

/**
 * 疾病库表  <br>
 * t_disease <br>
 * v1.0 2016-05-01
 */
 public interface DiseaseService {
	
	/**
 	*根据ID删除 疾病库表
 	*/
 	public Integer deleteDiseaseById(Integer id);
 	
 	/**
 	*新增 疾病库表
 	*/
 	public Integer batchInsertDisease(List<? extends Disease> diseases);
 	
 	/**
 	*新增 疾病库表
 	*/
 	public Integer insertDisease(DiseaseReq domain);
 
 	
 	/**
 	*更新 疾病库表
 	*/
 	public Integer updateDisease(DiseaseReq domain);
 	
 	/**
 	*根据ID查询 疾病库表
 	*/
 	public Disease findDiseaseById(Integer id);

	/**
 	*通过query 查询 疾病库表
 	*/
	public List<DiseaseRes> findDiseaseByQuery(DiseaseQuery query);	
	
	/**
	 * 疾病列表
	 * @param query
	 * @return
	 */
	public List<DiseaseRes> managerList(DiseaseQuery query);
	
	/**
 	*通过query count总条数
 	*/
 	public Integer countDiseaseByQuery(DiseaseQuery query);
 	
 	/**
 	* 通过ids查询
 	*/
 	public List<Disease> findDiseaseByIds(List<Integer> ids);
 	
 	
 	public List<DiseaseCategoryDict> getDiseaseByCategoryId(Integer categoryId);
 	/**
 	 * 根据身体部位获取疾病列表
 	 * @param bodypartId
 	 * @return
 	 */
 	public List<IdNameRes> findDiseaseByBodypartId(Integer bodypartId);
 	
 	public void syncInRedis(boolean force);
 	
	public void syncSingletonRedis(Integer diseaseId);
	
	public Disease findDiseaseByIdWithCache(Integer id);
	
	public Integer disableDisease(Integer diseaseId);
	
	public Integer enableDisease(Integer diseaseId);
	/**
	 * 根据身体部位ID查询症状列表
	 * @param bodypartId
	 * @return
	 */
	public List<Symptom> findSymptonListByBodypartId(Integer bodypartId);
	/**
	 * 根据症状ID添加疾病列表
	 * @param query
	 * @return
	 */
	public List<DiseaseRes> findDiseaseListForSymptomId(DiseaseQuery query);
 	
}	